<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title></title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<script type="text/javascript">
		<!--
		$(function(){
			$('#btnSubmit').click(function(){
				var status = $('select[name="status"]').val();
				var statusText = $('select[name="status"]').find('option[value="'+status+'"]').text();
				layer.confirm('确定['+statusText+']操作吗？',function(confirmed){
		    		$('#form').submit();
		    	});
			});
		});
		//-->
		</script>
	</head>
	<body>
		<div class="row">
			<#include "common/breadcrumb.ftl">
			<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
				<div class="col-xs-12">
					<div class="widget-box">
						<div class="widget-body">
							<input type="hidden" name="applyId" id="applyId" value="${model.applyId}">
							<div class="alert alert-danger">
								<strong>提示!</strong>
								请认真核对信息。
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									申请人
								</label>
								<div class="col-sm-4">
									<input type="text" value="${model.applyUser}" class="form-control" disabled="">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									申请金额
								</label>
								<div class="col-sm-4">
									<input type="text" value="${model.applyCash}" class="form-control" disabled="">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									用户余额
								</label>
								<div class="col-sm-4">
									<input type="text" value="${balance}" class="form-control" disabled="">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									可申请余额
								</label>
								<div class="col-sm-4">
									<input type="text" value="${balance}" class="form-control" disabled="">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">
									是否通过审核
								</label>
								<div class="col-sm-4">
									<#if model != null && balance gte model.applyCash >
										<select name="status" <#if model.status gte 2 >disabled</#if> >
											<option value="2" <#if model.status == 2 >selected="selected"</#if> >审核通过</option>
											<option value="4" <#if model.status == 4 >selected="selected"</#if> >审核不通过</option>
										</select>
									<#else>
										<select name="status" <#if model.status gte 2 >disabled</#if>>
											<option value="4" <#if model.status == 4 >selected="selected"</#if> >审核不通过</option>
										</select>
										<div class="alert alert-danger">
											<strong>提示!</strong>
											申请提现金额大于用户余额，不能审核通过。
										</div>
									</#if>
								</div>
							</div>
							<div class="clearfix form-actions">
								<div class="col-md-offset-3 col-md-9">
									<#if model.status lt 2  >
									<button id="btnSubmit" class="btn btn-info" type="button">
										<i class="fa fa-check bigger-110"></i>
										提 交
									</button>
									<#else>
									<a href="${base}/${back_url}" class="btn btn-info">
										<i class="fa fa-arrow-left bigger-110">返回</i>
									</a>
									</#if>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</body>
</html>